package cloud.dandanit.itservice.handler;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 手动抛出自定义异常
 * 有参构造 @AllArgsConstructor
 * 无参构造 @NoArgsConstructor
 * @Author luokai
 */
@SuppressWarnings("Lombok")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DandanException extends RuntimeException {

    @ApiModelProperty(value = "状态码")
    private Integer code;

    private String msg;

    @Override
    public String toString() {
        return "DandanException{" +
                "message=" + this.getMessage() +
                ", code=" + code +
                '}';
    }

}
